import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)
import ElementPlus from 'element-plus'
// 如果只想导入css变量
import 'element-plus/theme-chalk/dark/css-vars.css'
import 'element-plus/dist/index.css'
//@ts-ignore忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

import 'virtual:svg-icons-register'
import pinia from './store/index.ts'
import gloablComponents from './components/index.ts'
import '@/styles/index.scss'
import router from './router' //引入路由
import '@/permisstion.ts' //鉴权控制
app.use(gloablComponents)
app.use(ElementPlus, {
  locale: zhCn,
})
// 注册路由
app.use(router)
app.use(pinia)
import { isHasButton } from './directive/has.ts'
isHasButton(app)
app.mount('#app')
